Repository navigation
fix(seidb): fix stale FlatKV migration gauges on snapshotting nodes - #4436
Conversation
…ty stores in snapshot key totals Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…call site Co-authored-by: Cursor <cursoragent@cursor.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR SummaryLow Risk Overview Migration metrics: Snapshot key counts: When Adds regression tests for both behaviors. No consensus, state, or wire-format changes—metric emission only. Reviewed by Cursor Bugbot for commit 4e2f62b. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
Derived composite stores (read-only views and copies) now build their MigrationManager with local-only metrics, so they stop overwriting the live store's process-wide migration gauges, and rootmulti Snapshot now records zero for a store exported with no nodes. I found nothing blocking: only derived stores take the WithoutTelemetry option, store headers in the export are unique per stream so resetting them loses no counts, and codex's reading that found nothing contributed no findings and matches mine (I could not run the new tests because the sandbox has no Go toolchain).
Pre-existing
Already true on the base branch, not introduced here.
- suggestion — In rootmulti
Snapshot, a store that is left out of the export entirely still keeps its lastiavl_total_*values, because only stores seen in the stream get recorded.CompositeCommitStore.ExportersetsincludeMemiavlto false once MigrateBank completes, so after that every memiavl store's key and byte gauges stay frozen at their last values. This is the same stale-dashboard symptom, just later in the migration, so it is worth fixing in a follow-up.
seidroid review · decision approve · session 32fb13770ade4a2caab92420ca61aec1 · turn resp_claude_b57292621bf2478dae1f2cd5518ed279 · item f054e084a6ae508a917c46aa98873441
Findings: 0 blocking | 0 non-blocking | 0 posted inline | 1 pre-existing
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4436 +/- ##
==========================================
+ Coverage 56.46% 56.74% +0.28%
==========================================
Files 2123 2126 +3
Lines 166573 166836 +263
==========================================
+ Hits 94050 94675 +625
+ Misses 72518 72156 -362
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Successfully created backport PR for |
…s on snapshotting nodes (#4442) Backport of #4436 to `release/v6.7`. --------- Co-authored-by: yirenz <blindchaser@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: blindchaser <zengyiren0@gmail.com>
On atlantic-2, archive-0-0-0, snapshotter-0 and state-sync-node-0 finished the EVM migration (all 123,876,555 keys moved,
seidb_migration_versionwent to 1), but the FlatKV migration dashboard still shows them as migrating, at 99.3% with ~875k EVM keys left in memIAVL. The migration is complete; two gauges report stale values, and only on nodes that export state-sync snapshots. A snapshot export opens a read-only composite store at the snapshot height, and when that height is before completion, theMigrationManagerbuilt for that handle records version 0 on the process-wideseidb_migration_versiongauge. Nothing records 1 again until restart. Separately,rootmulti.Store.Snapshotrecordsiavl_total_num_keysonly for stores that exported at least one node, so once the memIAVLevmtree is empty its last pre-migration value is exported forever. This is the same retention problem #4327 fixed forseidb_migration_boundary_snapshot.migration.BuildRouternow takesRouterOptions, andWithoutTelemetry()gives the router'sMigrationManagernewLocalMigrationMetrics()instead of the OTel-backed instance.CompositeCommitStore.buildRouterpasses it for derived stores (theLoadVersionReadOnlyview andCopy), so only the live store publishes migration metrics.Snapshotsets the per-store totals to zero on each store header, so a store with no nodes records 0. Converting the version gauge to an observable gauge would also work, but it leaves read-only handles publishing the other migration counters, so they are cut off at the router instead.No consensus, state, or wire-format impact: only metric emission changes, and the option is variadic, so existing
BuildRoutercallers are unchanged. A store absent from an export entirely (rather than exported empty) still keeps its last value; that does not occur forevmafter the migration. Affected nodes show correct values after deploy, once they restart and export their next snapshot.TestLoadVersionReadOnlyDoesNotReportMigrationVersionandTestSnapshotReportsZeroKeysForEmptyStoreeach fail without their half of the fix; the migration, composite and rootmulti suites pass.